Imports CrystalDecisions.CrystalReports.Engine
Partial Class Content_P007_REP_N
    Inherits System.Web.UI.Page
    Dim fcn As CLS_FCN
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        fcn = New CLS_FCN
        Dim pDate As String = Me.Request.QueryString("date")
        Dim tDate As String = Me.Request.QueryString("tdate")
        Dim dCode As String = Me.Request.QueryString("depcode")

        '---Crystal Report------
        Dim rpt As New ReportDocument
        rpt.Load(Server.MapPath("P007.rpt"))
        rpt.SetDatabaseLogon("exatpty", "exatpty")
        'rpt.SetParameterValue("start", pDate)
        'rpt.SetParameterValue("end", tDate)
        rpt.SetParameterValue("payStart", fcn.GetDate(pDate))
        rpt.SetParameterValue("payEnd", fcn.GetDate(tDate))
        rpt.SetParameterValue("depCode", dCode)

        Me.P007.ReportSource = rpt
    End Sub
End Class
